/*
 * @lc app=leetcode.cn id=172 lang=cpp
 *
 * [172] 阶乘后的零
 */
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>

using namespace std;
// @lc code=start
class Solution {
public:
    int trailingZeroes(int n) {
        //转换成求5的个数
        int ret = 0;
        while(n){
            ret += n/5;
            n /= 5;
        }
        return ret;
    }
};
// @lc code=end

